home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mintmant
/
dopendir.txt
< prev
next >
Wrap
Text File
|
1992-03-24
|
2KB
|
64 lines
Dopendir(2) Oct. 1, 1991 Dopendir(2)
NAME
Dopendir - open a directory for reading
SYNOPSIS
LONG Dopendir( char *name, WORD flag );
DESCRIPTION
Dopendir opens the directory whose name is pointed to by
name for reading. A 32 bit directory handle is returned
which may be passed to Dreaddir to actually read the direc-
tory. flag controls the way directory operations are per-
formed. If flag == 1, then the directory is read in "compa-
tibility" mode, if flag == 0 then directory operations are
performed in "normal" mode. In "compatibility" mode, file
systems act as if the Fsfirst and Fsnext functions were
being used; in particular, if it is possible file names will
be restricted to the DOS 8 character name + 3 character
extension convention, and will be in upper case. In "nor-
mal" mode, file systems do not attempt to restrict the range
of names. Moreover, in this mode the Dreaddir system call
will also return a file index number (similar to the Unix
inode number) along with the file name.
New programs should generally use normal mode where possi-
ble.
RETURNS
A 32 bit directory handle, on success. Note that this han-
dle may be negative, but will never contain the pattern 0xFF
in the upper byte, whereas all errors do contain this pat-
tern in the upper byte.
EPTHNF if name is not a valid directory
EACCDN if the directory is not accessible by this program
ENSMEM if the kernel is unable to allocate memory needed for
the directory operations
SEE ALSO
Dclosedir(2), Dreaddir(2), Drewinddir(2)
BUGS
Failure to call Dclosedir() when the search is done could
result in the system eventually running out of file indices;
this is fatal. So always call Dclosedir() when you're fin-
ished with the directory search!
Version 0.9 Last change: MiNT Programmer's Manual 1